def test_usb_hotplug_detection(hardware_monitor):
    hardware_monitor.start()
    hardware_monitor.simulate_usb_insertion()
    assert hardware_monitor.wait_for_device() == True